﻿using System;

namespace Day
{
    class Program
    {
        static void Main(string[] args)
        {

            DateTime da = DateTime.Now;
            Console.WriteLine("今天的日期是：{0}", da);
            Console.WriteLine("当前是：{0}", da.DayOfWeek);
            Console.WriteLine("当前是一年的第{0}天", da.DayOfYear);
            Console.WriteLine("30年的日期是{0}", da.AddYears(30));
            Console.WriteLine(da.AddHours(1.1).ToString());
            Console.WriteLine("000年4月天数：{0}", DateTime.DaysInMonth(2001, 4));

            DateTime da1 = DateTime.Now;
            DateTime da2 = new DateTime(2020, 4, 28);
            TimeSpan ts = da2 - da1;
            Console.WriteLine("间隔的天数为{0}天", ts.Days);

        }
    }
}
